/*
 * GIPF; Team 2, Maastricht University; Project 2-1, Fall 2012.
 */
package gipf.trunk;

/**
 *
 * @author  log:
 */
public class Action {
    //Singleton-Pattern.
    //private static final Action instance = new Action();
    //RuleBook ruleBook;
   // private RuleBook RuleBook;
    Command command;
 
    
    
    public Action() {
    }
    
    public  Action getInstance(){
        return this;
   }

    public void receive (Command cmd, long timeStamp){ //receive a cmd object with methods to exeute to him
        this.command = cmd;
        
        //use strCmmd as you want, pass a string, cut it and use those chars as commands to implement
        
        /*IMPORTANT!
         * command process example: chars = "CREATE,2,(x,y),NORTH"
         * chars = strCmmd.split(",") //split by commas and store 
         * if chars[0] == "CREATE"
         *      assuming  Pieces.createPiece(int Player_id, double position, int direction)
         *      Pieces.createPiece(chars[1],chars[2],chars[3]) //create the piece, processing the command
         * 
         * feel free to design a sintax
         
         */
        
       
        
        
    }
    
    
   
   
}
